﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;
using T.FAS.Runtime.Base.Entity;

namespace T.FAS.Runtime.Metadata.Entity.Page
{
    /// <summary>
    /// 表单本地变量
    /// </summary>
    [DataContract]
    [Serializable]
    public class PageMethod : ICloneable
    {
        /// <summary>
        /// 主键
        /// </summary>
        [DataMember]
        public string ID { get; set; }
        /// <summary>
        /// PageID
        /// </summary>
        public string PageID { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int MethodOrder { get; set; }
        /// <summary>
        /// 标识
        /// </summary>
        [DataMember]
        public string Code { get; set; }
        /// <summary>
        /// 变量名
        /// </summary>
        [DataMember]
        public string Name { get; set; }
        /// <summary>
        /// 数据类型
        /// </summary>
        [DataMember]
        public string DataType { get; set; }
        /// <summary>
        /// 显示内容
        /// </summary>
        [DataMember]
        public string DisplayTypeInfo { get; set; }
        /// <summary>
        /// 实体元数据ID
        /// </summary>
        [DataMember]
        public string EntityMetadataID { get; set; }
        /// <summary>
        /// 实体元数据类型
        /// </summary>
        [DataMember]
        public string EntityMetadataType { get; set; }
        /// <summary>
        /// 变量名
        /// </summary>
        [DataMember]
        public string EntityMetadataAlias { get; set; }
        /// <summary>
        /// 事件实参列表
        /// </summary>
        [DataMember]
        public List<PageActionParameter> Parameters { get; set; } = new List<PageActionParameter>();

        /// <summary>
        /// 界面扩展JS脚本
        /// </summary>
        [DataMember]
        public string JSScript { get; set; }
        /// <summary>
        /// 界面扩展JS脚本
        /// </summary>
        [DataMember]
        public string JSScriptES5 { get; set; }
        public object Clone()
        {
            return this.MemberwiseClone();
        }
    }
}
